﻿(*
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the GNU Lesser General Public License
 * (LGPL) version 2.1 which accompanies this distribution, and is available at
 * http://www.gnu.org/licenses/lgpl-2.1.html
 * 
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
 * Lesser General Public License for more details.
 *)

namespace TfsEngine

open System

type PendingChange = {
    LocalItem: string
}

type LocalVersion = {
    Item: string
    Version: int
}

type IWorkspaceInfo =
    abstract ServerUri: Uri with get

type IWorkspace =
    abstract GetPendingChanges: items: string seq -> PendingChange seq
    abstract GetLocalVersions: items: string seq -> LocalVersion seq seq
    abstract GetServerItemForLocalItem: item: string -> string

type IVersionControlServer =
    abstract GetWorkspace: IWorkspaceInfo -> IWorkspace

type ITfsTeamProjectCollection =
    abstract GetVersionControlServer: unit -> IVersionControlServer

    inherit IDisposable

type ITfsEngine =
//    abstract GetLocalWorkspaceInfo: path: string -> IWorkspaceInfo option
    abstract GroupByLocalWorkspaceInfo: paths: string list -> (IWorkspaceInfo option * string list) list

    abstract TfsTeamProjectCollection: Uri -> ITfsTeamProjectCollection
